package com.yjc.hire.controller;


import com.yjc.hire.service.StuService;
import com.yjc.test.Stu;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("test")
public class TestController {
    @Autowired
    private StuService stuService;

    @GetMapping("t1")
    public Object test() {
        return "test";
    }

    @GetMapping("stu")
    public Object test1() {
        Stu stu = new Stu();
        stu.setAge(19);
        stu.setId("11001");
        stu.setName("jack");
        stuService.testSave(stu);
        return "OK";
    }
}
